﻿/*
 * Сделано в SharpDevelop.
 * Пользователь: Кулик
 * Дата: 01.04.2011
 * Время: 15:17
 * 
 * Для изменения этого шаблона используйте Сервис | Настройка | Кодирование | Правка стандартных заголовков.
 */
using System;

namespace Video.Mov
{
//	/// <summary>
//	/// mdia
//	/// </summary>
//	public struct MediaAtom:Atom{
//		public MediaHeaderAtom mediaHeaderAtom;
//		public HandlerReferenceAtom handlerReferenceAtom;
//		public MediaInformationAtom mediaInformationAtom;
//		public UserDataAtom userDataAtom;
//	}
	
	/// <summary>
	/// mdhd
	/// </summary>
	public class MediaHeaderAtom:Atom{
		public MediaHeaderAtom(Atom atom):base(atom){}
		public uint CreationTime;
		public uint ModificationTime;
		public uint TimeScale;
		public uint Duration;
		public ushort Language;
		public ushort Quality;
	}
	
	/// <summary>
	/// hdlr
	/// </summary>
	public class HandlerReferenceAtom:Atom{
		public HandlerReferenceAtom(Atom atom):base(atom){}
		//byte Version;
		//byte[] Flags = new byte[3];
		public char[] ComponentType;
		public char[] ComponentSubtype;
		public uint ComponentManufactured;
		public uint ComponentFlags;
		public uint ComponentFlagsMask;
		public string ComponentName;
	}
	
//	/// <summary>
//	/// minf
//	/// </summary>
//	public struct MediaInformationAtom:Atom{
//		public VideoMediaInformationHeaderAtom videoMediaInformationHeaderAtom;
//		//OR
//		public SoundMediaInformationHeaderAtom soundMediaInformationHeaderAtom;
//		public HandlerReferenceAtom handlerReferenceAtom;
//		public DataInformationAtom dataInformationAtom;
//	}
	
	/// <summary>
	/// vmhd
	/// </summary>
	public class VideoMediaInformationHeaderAtom:Atom{
		public VideoMediaInformationHeaderAtom(Atom atom):base(atom){}
		//byte Version;
		//byte[] Flags = new byte[3];
		public ushort GraphicsMode;
		public byte[] Opcolor = new byte[6];
	}
	
	/// <summary>
	/// smhd
	/// </summary>
	public class SoundMediaInformationHeaderAtom:Atom{
		public SoundMediaInformationHeaderAtom(Atom atom):base(atom){}
		//byte Version;
		//byte[] Flags = new byte[3];
		public ushort Balance;
		public ushort Reserved;
	}
}
